package com.zsc.roadsys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zsc.roadsys.entity.UserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @author haoran
 */

@Mapper
public interface UserRoleMapper extends BaseMapper<UserRole> {
    /**
     * 通过用户id查询用户权限
     * @param userId
     * @return UserRole
     */
    @Select("select * from user_role where user_id = #{userId}")
    public UserRole getByUserId(Long userId);
}
